set(Pjt_name tensorflowCCVisionLib) 
cmake_minimum_required(VERSION 3.2) 
find_package(OpenCV REQUIRED)


FIND_PACKAGE(object_recognition_renderer REQUIRED)
FIND_PACKAGE(PCL REQUIRED)


set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -std=c++11 -W")
aux_source_directory(SOURCE_FILE .)

# set(Eigen_include_DIR /usr/local/include/eigen3) #3.3.5
# set(Eigen_lib_DIR /usr/local/lib)
set(ABSL_DIR /usr/local/tensorflow/downloads/absl) #下载目录  
# set(Protobuf_DIR /usr/local)  #3.6.0
set(tesnsorflow_DIRS /usr/local/tensorflow)
set(Ros_Opencv_dir /opt/ros/kinetic/include/opencv-3.3.1-dev)
# SET_TARGET_PROPERTIES(${Pjt_name} PROPERTIES VERSION 1.2 SOVERSION 1)        #设置动态库版本号

# include_directories(${Pjt_name}
#     ${tesnsorflow_DIRS}/include
#     # ${Eigen_include_DIR} 
#     ${ABSL_DIR} 
#     ${Protobuf_DIR}/include
#     .
#     linemod_before
#     /opt/ros/kinetic/include/opencv-3.3.1-dev
# )



# link_directories(${Pjt_name}
#     # ${Eigen_lib_DIR} 
#     ${Protobuf_DIR}/lib
#     # ${tesnsorflow_DIRS}/lib  #原来的不带有AVE 指令加速
#     /home/de/tensorflow_cc_sse #带有AVE 指令加速
#     /usr/local/lib
#     # /home/de/work/tensorflow/bazel-bin/tensorflow #bazel 编译的时候生成
#     /build
#     /opt/ros/kinetic/lib/x86_64-linux-gnu
# ) 

###
FIND_PACKAGE(object_recognition_renderer REQUIRED)
INCLUDE_DIRECTORIES(testdemo 
    ${object_recognition_renderer_INCLUDE_DIRS}
    CsvData
    tensorflowCCVisionLib
    ${ABSL_DIR} 
    ${tesnsorflow_DIRS}/include
    ${PCL_INCLUDE_DIRS}  # pcl
    PclDepthToCloud #pcl
    ${Ros_Opencv_dir}
    linemod_before # linemod
    PclDepthToCloud  ## PCL VISUAL
)
link_directories(testdemo 
    /home/de/tensorflow_cc_sse
    ./build linemod_before/build 
    /opt/ros/kinetic/lib/x86_64-linux-gnu/ 
    /opt/ros/kinetic/lib
    CsvData/build
    build/tensorflowCCVisionLib  #tensorflow lib
    linemod_before/build #linemode 
    /opt/ros/kinetic/lib/x86_64-linux-gnu  # pcl
    /usr/lib/x86_64-linux-gnu              # pcl
    ${PCL_LIBRARY} # pcl
    ${object_recognition_renderer_INCLUDE_DIRS}## ros ork库
)
add_executable(testdemo 
    test.cpp 
    linemod_before/linemod_detector_Tool.cpp
    PclDepthToCloud/PclViewTools.cpp
    )


target_link_libraries(testdemo -ltensorflow_cc  -lprotoc -lopencv_core3 -lopencv_highgui3 
    -lopencv_imgcodecs3 -lopencv_imgproc3  -lopencv_videoio3 -ltensorflowCCVisionLib 
    -lfreeimage -ltiff -lopencv_rgbd3 -lCsvData  ${object_recognition_renderer_LIBRARIES} 
    -lpcl_visualization -lboost_system -lpcl_io -lboost_thread

    -lvtkRenderingFreeTypeOpenGL-6.2 -lvtkRenderingMatplotlib-6.2 -lvtkRenderingFreeTypeFontConfig-6.2 -lvtkInteractionStyle-6.2 
    -lvtkRenderingOpenGL-6.2 -lvtkRenderingFreeType-6.2 -lvtkCommonCore-6.2 -lpcl_common -lvtkRenderingLOD-6.2 -lvtkRenderingCore-6.2
    -lvtkFiltersSources-6.2 -lvtkCommonExecutionModel-6.2 -lvtkCommonDataModel-6.2 -lvtkCommonMath-6.2
)  # pcl -lLinemodDetectorTool 



# add_subdirectory(tensorflowCCVisionLib)
# add_subdirectory(CsvData)
# add_subdirectory(linemod_before)

# add_executable(temp temp.cpp)
# target_link_libraries(temp -ltensorflow_cc -lprotoc -lopencv_core -lopencv_highgui -lopencv_imgcodecs -lopencv_imgproc -ltensorflowCCVisionLib)
# add_executable(readDepth readDepth.cpp)
# target_link_libraries(readDepth -ltensorflow_cc -lprotoc -lopencv_core -lopencv_highgui -lopencv_imgcodecs -lopencv_imgproc)



